package com.bestdreamer.reentrant_lock;

public class Demo2Sub extends Demo2Main {


    public synchronized void operateISubMethod() {
        try{
            while ( i > 0 ){
                i--;
                System.out.println("sub print i=" + i);
                Thread.sleep(100);
                this.operateIMainMethod();
            }
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
